home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2912 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: VC++ v.4.0 conversion problems
  5. Date: 20 Jan 1996 12:12:44 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4dqm7s$1j9@news1.usa.pipeline.com>
  8. References: <4dpcvt$5gs@news.halcyon.com>
  9. NNTP-Posting-Host: pipe7.h1.usa.pipeline.com
  10. X-PipeUser: grantp
  11. X-PipeHub: usa.pipeline.com
  12. X-PipeGCOS: (Pete)
  13. X-Newsreader: Pipeline USA v3.3.0
  14.  
  15. On Jan 20, 1996 00:29:08 in article <Re: VC++ v.4.0 conversion problems>,
  16. 'normanb@halcyon.com (Norm Bryar)' wrote: 
  17.  
  18.  
  19. >morb@novo.dk (Morten Brun) wrote: 
  20. >>I am having a lot of problems when compiling under v.4. as I am etting 
  21. >>a lot of conversions errors due to the new behavior of v.4 like: 
  22. >> 
  23. >>LPWSTR                    lpszName; 
  24. >>GetPrivateProfileStringA("x", "y", "",lpszName, sizeof(lpszName), 
  25. >>\\xxx.INI"); 
  26. This does not solve your compile problems but will surely cause 
  27. headaches at run time.  lpszName (here's where HN comes 
  28. in semi-handy :-)) is a pointer.  The sizeof(lpszName) evaluates 
  29. to the size of the pointer; i.e., 4 bytes.  I doubt that's what 
  30. you intended. 
  31.  
  32. -- 
  33. Pete Grant 
  34. Kalevi, Inc. 
  35. Object Oriented Software Development
  36.